# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: tinywrkb <tinywrkb@gmail.com>

pkgname=fsverity-utils
pkgver=1.5
pkgrel=2
pkgdesc='Userspace utilities for fs-verity'
url='https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/fsverity-utils.git'
license=('MIT')
arch=('loong64' 'x86_64')
depends=('openssl')
makedepends=('pandoc')
source=("${url}/snapshot/${pkgname}-${pkgver}.tar.gz")
sha256sums=('830e38ec081ef8171eb210461cf8bee8a707c7c60f9018a4b567af145a510884')

build() {
  cd ${pkgname}-${pkgver}
  make USE_SHARED_LIB=1 PREFIX=/usr DESTDIR=${pkgdir}
}

package() {
  cd ${pkgname}-${pkgver}
  make USE_SHARED_LIB=1 PREFIX=/usr DESTDIR=${pkgdir} install
  make USE_SHARED_LIB=1 PREFIX=/usr DESTDIR=${pkgdir} install-man
  install -Dm644 LICENSE -t ${pkgdir}/usr/share/licenses/${pkgname}/
  install -Dm644 README.md -t ${pkgdir}/usr/share/doc/${pkgname}/
}
